package com.suineg.pms.service.fee;

import java.util.List;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.suineg.pms.entity.fee.FeePlan;
import com.suineg.pms.repository.fee.FeePlanDao;

/**
 * 收费方案 
 *@author Suine
 */
@Service
@Transactional
public class FeePlanService {
	/** 日志输出对象 */
	protected final Logger logger = LoggerFactory.getLogger(getClass());
	@Autowired
	private FeePlanDao dao;
	
	public FeePlan findByName(String name){
		return dao.findByName(name);
	}
	
	
	/**
	 * 获取公用的方案
	 * @return
	 */
	public List<FeePlan> findByPublic(){
		return dao.findByPublic();
	}
	
	public FeePlan get(Long id){
		return dao.findOne(id);
	}
	
	public void save(FeePlan feePlan){
		dao.save(feePlan);
	}
	
	public void delete(Long id){
		dao.delete(id);
	}

}

